package cn.beyond.vehicleManagement.service;

import cn.beyond.vehicleManagement.dao.MenuDao;
import cn.beyond.vehicleManagement.pojo.SysMenu;
import cn.beyond.vehicleManagement.util.DataBaseUtil;

import java.util.List;
import java.util.Map;

public class MenuService {
       MenuDao dao=new MenuDao();

    /**
     * 添加菜单
     * @return
     */
    public int addMenu(SysMenu sysMenu){
        return    dao.addMenu(sysMenu);
    }

    /**
     * 删除菜单
     * @param obj
     * @param column
     * @return
     */
    public int deleteMenu(Object obj,String column){
        return dao.deleteMenu(obj,column);

    }

    /**
     * 修改菜单
     * @return
     */
    public int update(SysMenu sysMenu){
        return  dao.update(sysMenu);
    }

    /**
     * 查询结果返回单条记录
     * @param selectmap
     * @return
     */
    public SysMenu selectMenuByOne(SysMenu sysMenu, Map<String, Object> selectmap){
        return dao.selectMenuByOne(sysMenu,selectmap);
    }

    /**
     * 查询结果返回多条记录
     * @param selectmap
     * @return
     */
    public List<SysMenu> selectUserByCondition(SysMenu sysMenu, Map<String, Object> selectmap){
        return  dao.selectUserByCondition(sysMenu,selectmap);
    }

}
